import { Body, Controller, Post, UseGuards } from '@nestjs/common';
import { EssayService } from './index.service';
import { CommonGuard } from '@/authGuard/common.guard';

@Controller()
export class EssayController {
  constructor(private readonly essayService: EssayService) {}

  @UseGuards(CommonGuard)
  @Post('getRecommend')
  getRecommend(@Body() params) {
    return this.essayService.getRecommend(params);
  }

  @UseGuards(CommonGuard)
  @Post('getRecommendDetail')
  getRecommendDetail(@Body() params) {
    return this.essayService.getRecommendDetail(params);
  }
  @UseGuards(CommonGuard)
  @Post('getFanwen')
  getFanwen(@Body() params) {
    return this.essayService.getFanwen(params);
  }
  @UseGuards(CommonGuard)
  @Post('getFanwenDetail')
  getFanwenDetail(@Body() params) {
    return this.essayService.getFanwenDetail(params);
  }
}
